<!DOCTYPE html>
<html lang="en">

<head>
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<style>
    span {
         position: absolute; 
        left: 0;
        top: 5.3333rem;
        display: block;
        width: 4rem;
        height: 4rem;
        background-color: pink;
    }
</style>
</head>

<body>
    <span></span>
   <!-- <div class="search">
        <div class="con">666</div>
        <input type="text" placeholder="输入" id="jd">
    </div>
    
 --> 
 <!-- <div class="hour">520</div>
 <div class="minutes">13</div>
 <div class="second">14</div> -->
 <!-- <button class="begin">begin</button>
 <button class="stop">stop</button> -->
 <!-- <input type="number"> -->
 <!--  <button>发送</button> --*/ -->
 <!-- <button class="btn500">刘明月beautiful</button>
 <button class="btn800">刘明月smart</button> -->
 <script> 
//     function  animate(obj,target,callback){
//         clearInterval(obj.timer );
//         obj.timer = setInterval(function() {
//             var step = (target - obj.offsetLeft)/10;
//             step = step> 0 ? Math.ceil(step) : Math.floor(step);
//             if(obj.offsetLeft==target){
//                 clearInterval(obj.timer);
//                 if(callback){
//                     callback();
//                 }
//             }
//             obj.style.left = obj.offsetLeft + 1 + 'px';
//         },15);}
       
//     //var step = document.querySelector('step');
//        // var div = document.querySelector('div');
//         var span = document.querySelector('span');
//         var btn500 = document.querySelector('btn500');
//         var btn800 = document.querySelector('btn800');
//         animate(span,200);
// btn500.addEventListener('click',function () {
//     animate(span,500);
// })
// btn800.addEventListener('click',function () {
//     animate(span,800);
// })/*  */ 
   /*  */ /* var box = document.querySelector('.box');
    box.addEventListener('mousemove',function(e)
{
   // console.log('e.pageX');
   var x = e.pageX - this.offsetLeft;
   var y = e.pageY - this.offsetTop;
   this.innerHTML = 'x的坐标是' + x + 'y的坐标是' + y;
}) */
/*  *//* var div = document.querySelector('div');
var timer = setInterval(function () {
    if(div.offsetLeft>=400){
        clearInterval(timer);
    }
    div.style.left = div.offsetLeft + 1 +'px';
},30) ; */


    /*var btn = document.querySelector('button');
    btn.addEventListener('click',function(){
        location.assign('http://www.itcast.cn');  */
       // location.replace('http://www.itcast.cn');
       //location.reload(true);
    /* document.addEventListener('keyup',function (e) {
        console.log('up:' + e.keyCode);
        if(e.keyCode==65){
            alert('年下了a');
        }
        else{
            alert('你没有按下');
        }
    }) */
    
    /* var search = document.querySelector('input');
    document.addEventListener('keyup',function(e) {
        if(e.keyCode==83){
            search.focus();
        }
    }) */

 /* var con = document.querySelector('.con');
var jd_input = document.querySelector('.jd');
jd_input.addEventListener('keyup',function (){
    if(this.value==''){
        con.style.display='none';
    }
    else{
        con.style.display='block';
        con.innerHTML=this.value;
    }
}) */
/* 1.setTimeout(function(){
    
console.log('时间到啦');
    
}, 3000);
2.
function callback() {
    console.log('bao');
}
setTimeout(callback,3000);
*/
/* /var btn = document.querySelector('button');
var time1 = setTimeout(function () {
    console.log('爆炸啦');
},6000);
btn.addEventListener(click,function () {
    clearTimeout(time1);
}) */
/*  setInterval(function (){
    console.log('hhhhhh');
},2000);重复调用*/
 /* var hour = document.querySelector('.hour');
var minutes = document.querySelector('.minutes');
var second = document.querySelector('.second');
var inputtime = + new Date('2024-5-3 18:00:00');
setInterval(countdown,1000);
function countdown(){
    var nowtime = +new Date();
    var times = (inputtime-nowtime)/1000;
    var h = parseInt(times/60/60%24);
    h=h<10?'0' + h : h;
    hour.innerHTML = h;
    var m = parseInt(times/60%60);
    h=m<10?'0' + m : m;
    minutes.innerHTML = m;
    var s = parseInt(times%60);
    s=s<10?'0' + s : s;
    second.innerHTML = s;
}
setInterval(countdown,function() {
    console.log('888');
},1000);

 */
/* var begin = document.querySelector('.begin');
var stop = document.querySelector('.stop');
var timer = null;
begin.addEventListener('click',function () {
    timer = setInterval(function() {
        console.log('你好');
    },1000);
}
)
 stop.addEventListener('click',function (){
        clearTimeout(timer);
    }) */
    /*  var btn = document.querySelector('button');
    btn.addEventListener('click',function (){
        btn.disabled = true;
        setInterval(function () {
            if(time==0){
                clearInterval(timer);
                btn.disabled = false;
                btn.innerHTML='发送';
                time=3;
            }else {
                btn.innerHTML = '还剩下' + time +'秒';
                time--;
            }
        })
    },1000);*/

</script>
</body>
</html>